<template>
	<view class="tabs">
		<view class="text-box" :class="item.isActive ? 'active' : ''" v-for="(item,index) in tabs"
		@click="click(item.id)" :key="item.id">
			{{item.value}}
		</view>
	</view>
</template>

<script>
	export default {
		name:"ljy-tabs",
		data() {
			return {
				
			};
		},
		props:['tabs'],
		methods: {
			click(activeId) {
				this.$emit("tabsChange",activeId);
			}
		}
	}
</script>

<style lang="scss">
	.tabs {
		height: 100rpx;
		display: flex;
		justify-content: center;
		align-items: center;
		border-bottom: 1px solid #D9557C;
		
		.text-box {
			height: 80rpx;
			flex: 1;
			display: flex;
			justify-content: center;
			align-items: center;
			border: 1px solid #CD9D37;
			border-radius: 25px;
			margin: 0 25rpx;
			font-size: 18px;
			background-color: #FDEDAF;
			color: #CD9D37;
			
			&.active {
				background-color: #CD9D37;
				color: white;
			}
		}
	}
</style>